import request from '@/utils/request'
import { prefilter } from '@/utils'

export function userLogin (data) {
  prefilter(data)
  return request({
    url: '/portal-service/user/login',
    method: 'post',
    data
  })
}

export function getInfo (token) {
  return request({
    url: '/user/info',
    method: 'get',
    params: { token }
  })
}

export function userlogout (params = {}) {
  prefilter(params)
  return request({
    url: '/portal-service/user/logout',
    method: 'get',
    params
  })
}
